package com.hehui.module.customer.service.impl;

import com.hehui.module.customer.dao.CustomerGroupMapper;
import com.hehui.module.customer.entity.CustomerGroup;
import com.hehui.module.customer.service.ICustomerGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CustomerGroupServiceImpl implements ICustomerGroupService{

    @Autowired
    private CustomerGroupMapper groupMapper;

    @Override
    public List<CustomerGroup> selectCustomerGroup(CustomerGroup customerGroup) {


        return null;
    }

    @Override
    public int insertCustomerGroup(CustomerGroup customerGroup) {
        return groupMapper.insertSelective(customerGroup);
    }

    @Override
    public int deleteCustomerGroupById(Long customerGroupId) {
        return groupMapper.deleteByPrimaryKey(customerGroupId);
    }

    @Override
    public int checkHasCustomerById(Long customerGroupId) {
        //未实现
        return 0;
    }
}
